home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore 64 Scene Diskmags Assortment
/
Uptime_The_Disk_Monthly_V1_07_19xx_Uptime_staff_Side_B.d64
/
credit card mgr.
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
11KB
|
336 lines
10 rem credit card filer
25 rem by mike cooke
40 rem (c) 1987
55 rem published by:
70 rem viking technologies, inc.
85 rem
100 ifl=0thenl=1:open15,8,15,"i0":close15:load"0:lptr rtn",8,1
110 sys 65418:poke 808,234
115 clr:printchr$(8);chr$(14):up$=chr$(17)
120 poke 53269,0
130 nc=0:dimc$(26,4)
145 poke53280,0:poke53281,0
150 print"[147]"
260 v=53248:gt=14335
265 fort=1to256:reada:pokegt+t,a:nextt:poke2040,224:poke2041,225
280 poke2042,226:poke2043,227:pokev+41,6:pokev+42,6:pokev+39,8:pokev+40,8
295 pokev+28,15:pokev+37,1:pokev+38,7:pokev+16,12
310 pokev,47:pokev+2,71:pokev+4,9:pokev+6,33:pokev+1,68:pokev+3,68:pokev+5,68
325 pokev+7,68:pokev+21,15
326 print"[147][155] "
327 print" [146] [146]"
328 print" [146] [146]"
329 print" [146] [154][195]redit [195]ard [198]iler[155] [146]"
330 print" [146] [146]"
331 print" [146][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164] [146]"
332 print" [208]ress [198]8 to [210]eturn to [213]p[212]ime ":print
340 print"[159] [215]ritten by [205]ike [195]ooke"
355 print" (c) [195]opyright 1987"
370 print" [208]ublished by [214]iking [212]echnologies, [201]nc."
385 print"[152] [196]o you want instructions? ";
390 poke 198,0
400 geta$:ifa$="[140]"then4360
415 ifa$="y"thenprint"[155][217]es":goto610
430 ifa$="n"thenprint"[155][206]o":goto1090
445 goto400
460 rem *** clear space ***
475 print""
490 z=0:forz=1to16:print" ":nextz
505 print""
520 return
535 rem *** press spacebar ***
550 print" [208]ress [150]<[211][208][193][195][197]> to [195]ontinue"
565 geta$:ifa$="[140]"then4360
580 ifa$<>chr$(32)then565
595 return
610 rem *** instructions ***
625 gosub460:print"[152] [212]his program's purpose is to store"
640 print"up to 25 different sets of credit card"
655 print"information. [198]or each card, the program"
670 print"will store its name, number, exp date,"
685 print"and a phone number to call if you were"
700 print"to lose the card. [201]f you were to lose"
715 print"your cards, you would have easy access"
730 print"to the information you would need to"
745 print"tell the credit card company."
760 print:gosub535:gosub460
775 print"[152] [212]o put a card into the file, you"
790 print"would pick the first menu choose-add a"
805 print"card. [201]f you ever want to erase"
820 print"the information on a card, you would"
835 print"choose the the appropriate menu choice."
850 print"[155][193]lways 'save' the file before"
865 print"exiting if you have made changes in"
880 print"the file. [152][201]f you don't, the changes"
895 print"will not be recorded."
910 print:gosub535:gosub460
925 print"[152] [201]n the first part of the program"
940 print"you will be asked if this a new or an"
955 print"old file. [206]ew files are ones that have"
970 print"no data. [217]ou would choose this the"
985 print"first time you run the program. [207]ld"
1000 print"files are those with data in them you"
1015 print"want to change or add to. [201]f you say"
1030 print"that you want a new file after you have"
1045 print"already made a file, the first one will"
1060 print"be erased and a new one set up.":print:gosub535:gosub460
1061 print"[152] [212]he final menu choice, [208]rint [204]etter"
1062 print"is used when you lose a credit card and"
1063 print"you need to send a written request for"
1064 print"new credits cards. [217]ou are ask for"
1065 print"additional information to put in the"
1066 print"letter and you should reply in the"
1067 print"following format.":gosub535:gosub460
1068 print"[152] [206][193][205][197]: [155][205]ichael [211]. [195]ooke"
1069 print" [152] [193][204][212] [206][193][205][197]: [155][211]ondra [204]. [195]ooke"
1070 print" ([213]sed with more than one card holder)"
1071 print" [152][193][196][196][210][197][211][211]:[155] [208][207] [194]ox 100"
1072 print" or"
1073 print" 801 [204]akeshore [196]r."
1074 print" [152][195][201][212][217]: [155][211]elma [152][211][212][193][212][197]: [155][207][210] [152][218][201][208]: [155]97538"
1075 print" [152][196][193][212][197]: [155][193]ugust 13, 1987"
1076 print" [152][208][200][207][206][197] #: [155](503) 597-1212"
1089 gosub535:gosub460:goto340
1090 rem *** old/new file ***
1105 print"[152] [201]s this a [155][206][152]ew or [155][207][152]ld file? [157][157][157]";
1120 geta$:ifa$="[140]"then4360
1135 ifa$="n"thenprint"[155][206]ew":goto1180
1150 ifa$="o"thenprint"[155][207]ld":goto1420
1165 goto1120
1180 print" [193]re you sure? [157][157][157]";
1195 geta$:ifa$="[140]"then4360
1210 ifa$="y"thenprint"[217]es":goto1255
1225 ifa$="n"thenprint"[206]o[145][145][145][145]":goto1105
1240 goto1195
1255 rem *** new file ***
1270 open15,8,15,"i0":open1,8,2,"@0:-ccm data,s,w":input#15,a:ifa<20then1360
1285 print"[145][145][152][196][201][211][203] [197][210][210][207][210]!!! [208]lease check your drive":close1:close15
1300 print"and press space."
1315 geta$:ifa$=""then1315
1330 print"[145][145][145]":fort=1to2
1345 print" ":nextt:print"[145]":goto1270
1360 print"[152] [195]reating file..."
1375 print#1,0:close1:close15:fort=1to500:nextt
1390 goto1555
1405 rem *** old file ***
1420 open15,8,15,"i0":open1,8,2,"0:-ccm data,s,r":input#15,a$:ifa$<"20"then1510
1435 print"[152][196][201][211][203] [197][210][210][207][210]!!! [208]lease check your drive":close1:close15
1450 print"and press space."
1465 geta$:ifa$=""then1465
1480 print"[145][145][145]":fort=1to2
1495 print" ":nextt:print"[145][145][145][145][145][145]":goto1105
1510 print" [204]oading data...":input#1,nc$:nc=val(nc$):if nc>26 then nc=26
1525 fort=1tonc:fory=1to4:input#1,c$(t,y):nexty,t
1540 close1:close15
1555 rem *** main menu ***
1570 gosub460:print"[155] [195]hoose by [206]umber:":print
1585 print" [155]1)[152] [193]dd card":print
1600 print" [155]2)[152] [197]rase card":print
1615 print" [155]3)[152] [211]ave file":print
1630 print" [155]4)[152] [214]iew cards":print:printtab(13)"[155]5)[152] [208]rint [204]etter"
1645 print:print" [155][198]8)[152] [197]xit to [213]p[212]ime":print
1660 print"[155] [195]hoice:";
1675 geta$:ifa$="[140]"then4360
1690 a=val(a$):ifa<1ora>5then1675
1705 printa;" ([217]/[206])? ";
1720 geta$:ifa$=""then1720
1735 ifa$="y"thenprint"[217]es":goto1780
1750 ifa$<>"n"then1720
1765 print"[206]o":print"[145] [145]":goto1660
1780 onagosub1810,2065,2455,2725,3475
1795 goto1555
1810 rem *** add card ***
1825 gosub460:printtab(13)" [159][193]dd a [195]ard"
1840 ifnc=15thenprint:print"[155] [206]o more cards may be added.":gosub535:return
1855 print:print:nc=nc+1
1870 print:print" [152][195]ard name:[155] ";
1885 gosub3355:c$(nc,1)=a$
1887 if a$="" then c$(nc,1)="*"
1900 print:print" [152][206]umber:[155] ";
1915 gosub3355:c$(nc,2)=a$
1920 if a$="" then c$(nc,2)="*"
1930 print:print" [152][197]xp date: [155]";
1945 gosub3355:c$(nc,3)=a$
1950 if a$="" then c$(nc,3)="*"
1960 print:print" [152][212]elephone #: [155]";
1975 gosub3355:c$(nc,4)=a$
1980 if a$="" then c$(nc,4)="*"
1990 print:printtab(13)" [159][193]dd another?"
2005 geta$:ifa$=""then2005
2020 ifa$="y"then1810
2035 ifa$="n"thenreturn
2050 goto2005
2065 rem *** erase card ***
2080 gosub460:printtab(13)"[159][197]rase a [195]ard"
2095 ifnc=0thenprint:print"[152] [212]here are no cards to erase.":gosub535:return
2110 print:print"[152][213]se the up/down cursor key to scroll"
2125 print"the cards. [208]ress '[197]' to erase a card."
2140 print"press '[210]' to return to the menu."
2155 print:print
2170 c=1
2185 print"[155]";c$(c,1);"[152] - ";c$(c,2):print
2200 printtab(len(c$(c,1)));" ";c$(c,3);" ";c$(c,4)
2215 print"[195]ommand:"
2230 geta$:ifa$=""then2230
2245 ifa$="r"thenreturn
2260 ifa$="[145]"andc<ncthenc=c+1:goto2425
2275 ifa$=""andc>1thenc=c-1:goto2425
2290 ifa$<>"e"then2230
2305 print"[155][197]rase for sure? "
2320 geta$:ifa$=""then2320
2335 ifa$="y"thenprint"[145] [145]":goto2380
2350 ifa$<>"n"then2320
2365 print"[145] [145]":goto2230
2380 fort=ctonc:c$(t,1)=c$(t+1,1):c$(t,2)=c$(t+1,2):c$(t,3)=c$(t+1,3)
2395 c$(t,4)=c$(t+1,4):nextt:nc=nc-1:ifnc=0thenreturn
2410 c=1
2425 print"[145][145][145][145][145][145][145]":fort=1to3
2440 print" ":nextt:print"[145][145][145][145]":goto2185
2455 rem *** save file ***
2470 gosub460:printtab(13)"[154][211]ave [198]ile"
2485 print:print"[152][208]ress [155][211][152] to save or [155][210][152] to return to"
2500 print"the menu.":print"([211]/[210]):[155] ";
2515 geta$:ifa$=""then2515
2530 ifa$="s"thenprint"[211]aving...":goto2575
2545 ifa$="r"thenprint"[210]eturn":fort=1to250:nextt:return
2560 goto2515
2575 open15,8,15:open1,8,1,"@0:-ccm data,s,w"
2590 input#15,a:ifa<20then2680
2605 print"[196][201][211][203] [197][210][210][207][210]!!! [208]lease check your drive"
2620 print"and then press the space bar."
2635 geta$:ifa$=""then2635
2650 ifa$<>chr$(32)then2635
2665 close15:close1:goto2455
2680 print#1,nc
2695 fort=1tonc:fory=1to4:print#1,c$(t,y):nexty:nextt
2710 close15:close1:return
2725 rem *** view cards ***
2740 gosub460:printtab(13)"[159][214]iew [195]ards"
2755 print:print"[152][196]o you want them on the [155][211][152]creen or the"
2770 print"[155][208][152]rinter? ([211]/[208]/[210]): [155]";
2785 geta$:ifa$=""then2785
2800 ifa$="s"thenprint"[211]creen":goto3145
2815 ifa$="r"thenprint"[210]eturn":fort=1to250:nextt:return
2830 ifa$<>"p"then2785
2845 rem *** output to printer ***
2860 print"printer"
2875 poke780,2:poke782,0:sys828
2890 ifpeek(783)and1thenclose2:goto2920
2905 goto2965
2920 print"[155][208][210][201][206][212][197][210] [197][210][210][207][210]!!! [208]lease check your"
2935 print"paper supply and printer condition."
2950 gosub535:goto2725
2965 rem printer okay
2980 print#2,chr$(17);"*** [195]redit [195]ard [198]iler ***"
2995 print#2:print#2,up$;"[206]ame";spc(18);"[206]umber";spc(11);"[197]xp date";spc(3);
3010 print#2,up$;"[212]elephone"
3025 fort=1to60:print#2,"-";:nextt:print#2
3040 fort=1tonc
3055 print#2,up$;c$(t,1);spc(abs(20-len(c$(t,1))));c$(t,2);
3070 print#2,up$;spc(abs(20-len(c$(t,2))))c$(t,3);spc(abs(10-len(c$(t,3))));
3085 print#2,up$;c$(t,4)
3100 nextt
3115 fort=1to5:print#2:nextt:print#2,chr$(145)
3130 close2:return
3145 rem screen output
3160 gosub460:print"[152][213]se the up/down cursor key to scroll"
3175 print"the cards. [208]ress '[210]' to return to the":print"menu."
3190 print:print
3205 c=1
3220 print"[155]";c$(c,1);" - [152]";c$(c,2):print
3235 printtab(len(c$(c,1))+3);c$(c,3);" ";c$(c,4)
3250 print"[195]ommand:"
3265 geta$:ifa$=""then3265
3280 ifa$="r"thenreturn
3295 ifa$="[145]"andc<ncthenc=c+1
3310 ifa$=""andc>1thenc=c-1
3325 print"[145][145][145][145][145][145][145]":fort=1to3
3340 print" ":nextt:print"[145][145][145][145]":goto3220
3355 rem get input
3370 poke204,0
3385 c=0:a$="":l$=""
3400 getl$:ifl$=""then3400
3415 ifl$=chr$(20)andc>0thenc=c-1:a$=left$(a$,c):printl$;:goto3400
3430 ifl$=chr$(13)thenprint" ":poke204,1:return
3445 ifl$<" "orl$>"[218]"then3400
3450 if l$>"_" and l$<"[193]" then 3400
3455 if c=24 then 3400
3460 a$=a$+l$:printl$;:c=c+1:l$="":goto3400
3475 rem print letter
3490 gosub460:printtab(13)"[159][208]rint [204]etter"
3505 print:print:print" [155][215]hich card did you lose?[152]":print
3520 fort=1tonc:ift/2=int(t/2)thenprinttab(22);t"[157]> ";c$(t,1):goto3550
3535 print" ";t"[157]> ";c$(t,1);
3550 nextt:print:print:print" [155][206]umber- ";
3565 geta$:ifa$=""then3565
3580 ct=val(a$):ifct<1orct>ncthen3565
3595 print"[152]"ct
3610 print:print" [152][215]as this card [155][204][152]ost or [155][211][152]tolen?":print" (l/s)?"
3625 getsl$:ifsl$=""then3625
3640 ifsl$<>"l"andsl$<>"s"then3625
3655 gosub460:printtab(13)"[159][208]rint [204]etter":print
3670 print" [152][215]hat is your full name?":print" >[155]";:gosub3355:n1$=a$:print
3685 print" [152][193]lternate name?":print" >[155]";:gosub3355:n2$=a$:print
3700 print" [152][211]treet or [208][207] [194]ox address?":print" >[155]";:gosub3355:ad$=a$:print
3715 print" [152][195]ity?":print" >[155]";:gosub3355:ci$=a$
3730 print"[145][145]"tab(12)"[152][211]tate?":printtab(12)">[155]";:gosub3355:st$=a$
3745 print"[145][145]"tab(23)"[152][218]ip?":printtab(23)">[155]";:gosub3355:z$=a$:print
3760 print" [152][196]ate?":print" >[155]";:gosub3355:d$=a$
3775 print"[145][145]"tab(23)"[152][208]hone #?":printtab(23)">[155]";:gosub3355:pn$=a$:fort=1to500
3790 nextt
3805 gosub460:printtab(13)"[159][208]rint [204]etter":print:print
3820 print"[155] [212]ype '[210]' to return to menu or '[208]' to":print" print.":print" ([210]/[208])?"
3835 geta$:ifa$=""then3835
3850 ifa$="r"thengoto1555
3865 ifa$<>"p"then3835
3880 rem print letter routine
3895 poke780,2:poke782,0:sys828
3910 ifpeek(783)and1thenclose2:goto3940
3925 goto3985
3940 print"[155][208][210][201][206][212][197][210] [197][210][210][207][210]!!! [208]lease check your"
3955 print"paper supply and printer condition."
3970 gosub535:goto3805
3985 rem printer okay
4000 fort=1to12:print#2:nextt
4015 print#2,up$;spc(10);n1$:ifn2$<>""thenprint#2,up$;spc(10);n2$
4030 print#2,up$;spc(10);ad$:print#2,up$;spc(10);ci$;", ";st$
4045 print#2,up$;spc(12+len(ci$));z$
4060 print#2,up$;spc(10);pn$:print#2
4075 print#2,up$;spc(10);d$
4090 fort=1to5:print#2:nextt:tb$=" "
4105 print#2,up$;tb$;"[196]ear [211]ir or [205]adam:":print#2
4120 print#2,up$;tb$;" [210]ecently [201] called to inform you that my"
4135 print#2,up$;tb$;c$(ct,1);" card had been ";
4150 ifsl$="s"thenprint#2,up$;"stolen. ";
4165 ifsl$="l"thenprint#2,up$;"lost. ";
4180 print#2,up$;"[212]he number"
4195 print#2,up$;tb$;"is ";c$(ct,2);" with an expiration"
4210 print#2,up$;tb$;"date of ";c$(ct,3);". [208]lease send replacement"
4225 print#2,up$;tb$;"cards for the name";:ifn2$<>""thenprint#2,up$;"s ";:goto4255
4240 print#2," ";
4255 print#2,up$;"listed above at your"
4270 print#2,up$;tb$;"earliest convenience.":print#2
4285 print#2,up$;tb$;"[212]hank you for your helpful service."
4300 fort=1to5:print#2:nextt
4315 print#2,up$;spc(10);"[210]espectfully,":fort=1to4:print#2:nextt
4330 print#2,up$;spc(10);n1$:close2:goto1555
4345 end
4360 rem *** return to uptime ***
4375 sys (8*4096)
4390 data 85,85,85,85,85,85,85,85,85,85,127,245,85,255,253,87,255,255,87,255
4405 data 255,93,221,213,93,87,94,93,213,85,93,215,125,93,215,85,95,255,254,95
4420 data255,254,87,255,255,87,255,255,85,255,253,85,127,245,85,85,85,85,85,85
4435 data85,85,85,104
4450 data85,85,85,85,85,85,85,85,85,90,169,85,106,170,85,170,170,149,170,170
4465 data149,85,85,101,153,166,101,153,101,101,153,165,165,153,86,101,170,170
4480 data165,170,170,165,170,170,165,170,170,149,170,170,149,106,170,85,90
4495 data169,85,85,85,85,85,85,85,1
4510 data170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170
4525 data85,85,85,101,102,170,101,101,101,101,101,101,101,101,101,105,165,101
4540 data90,149,101,86,86,170,85,85,85,255,255,255,255,255,255,255,255,255,255
4555 data255,255,255,255,255,255,255,255,104
4570 data170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170
4585 data85,85,85,90,150,165,101,86,101,101,90,105,90,90,169,85,153,89,85,153
4600 data89,106,89,89,85,85,85,255,255,255,255,255,255,255,255,255,255,255,255
4615 data255,255,255,255,255,255,104